package com.GainLoop.Api;

import org.alexd.jsonrpc.JSONRPCException;
import org.json.JSONException;

import com.GainLoop.Api.Entity.Category;
import com.GainLoop.Api.Entity.Gain;
import com.GainLoop.Api.Entity.Tag;

public class Categories extends ApiAbstract {


	public ApiResponseObject<Category> getById(long id) throws JSONException, JSONRPCException
	{
		return new ApiResponseObject<Category>(GetClient().callJSONObject("categories.getById", id), Category.class);
	}
	
	public ApiResponseArray<Category> getAll() throws JSONException, JSONRPCException
	{
		return new ApiResponseArray<Category>(GetClient().callJSONObject("categories.getAll"), Category.class);
	}
	
}
